package com.lin.fengxiu.service;

import com.lin.fengxiu.model.User;
import com.lin.fengxiu.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
 * @ClassName UserService
 * @Description TODO
 * @Author wushaopei
 * @Date 2021/3/26 7:19
 * @Version 1.0
 */
@Service
public class UserService {

    @Autowired
    private UserRepository userRepository;

    public User getUserById(Long id){
        return userRepository.findFirstById(id);
    }
}
